// 大的数值变成亿，万

import { Pipe ,PipeTransform } from '@angular/core';

@Pipe({name:'categoryName'})

export class CategoryName implements PipeTransform{
  transform(input:string):string{


    let _catName = input;


    if (_catName === "/") {

      _catName = "全类目";

    } else if (_catName && _catName.toString().indexOf('--') != -1) {
      let arr = _catName.split('--');

      _catName = arr[arr.length - 1];
    } else {

    }

    return _catName;

  }
}
